import { uploadApi } from '@/api/sys/upload';
import { BasicFormComponentKeys } from '@/components/Form/src/componentMap';
import { BasicColumn, FormSchema } from '@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '章印id',
    dataIndex: 'id',
    width: 120,
  },
  {
    title: '章印名称',
    dataIndex: 'title',
    width: 120,
  },
  {
    title: '章印图片',
    dataIndex: 'stamp',
    width: 120,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'title',
    label: '章印名称',
    component: 'Input',
    colProps: { span: 8 },
  },
];

export const stampFormSchema: FormSchema[] = [
  {
    field: 'title',
    label: '章印名称',
    component: BasicFormComponentKeys.Input,
    required: true,
  },

  {
    label: '章印图片',
    field: 'stamp',
    component: BasicFormComponentKeys.ImageUpload,
    componentProps: {
      api: uploadApi,
    },
    required: true,
  },
];
